package cn.sypt.yuhao.model;

import java.sql.*;
import java.util.*;
import javax.sql.*;
import javax.naming.*;

public class DBcon {
	
	 String url="jdbc:mysql://localhost:3306/sypt";
	 String user="root";
	 String pass="root";
	 Connection ct=null;
	 
	   public Connection getConnection()
	   {
		   try {
			
			 Class.forName("com.mysql.jdbc.Driver");
			 ct=DriverManager.getConnection(url,user,pass);
		} catch (Exception e) {
			e.printStackTrace();
		}
		   return ct;
	   }

}
